3.111 \(\int \frac{\sqrt{a+b x+c x^2}}{d+e x+f x^2} \, dx\)

Optimal. Leaf size=431 \[ -\frac{\sqrt{f \left (2 a f-b \left (e-\sqrt{e^2-4 d f}\right )\right )+c \left (-e \sqrt{e^2-4 d f}-2 d f+e^2\right )} \tanh ^{-1}\left (\frac{4 a f+2 x \left (b f-c \left (e-\sqrt{e^2-4 d f}\right )\right )-b \left (e-\sqrt{e^2-4 d f}\right )}{2 \sqrt{2} \sqrt{a+b x+c x^2} \sqrt{2 a f^2-\sqrt{e^2-4 d f} (c e-b f)-b e f-2 c d f+c e^2}}\right )}{\sqrt{2} f \sqrt{e^2-4 d f}}+\frac{\sqrt{f \left (2 a f-b \left (\sqrt{e^2-4 d f}+e\right )\right )+c \left (e \sqrt{e^2-4 d f}-2 d f+e^2\right )} \tanh ^{-1}\left (\frac{4 a f+2 x \left (b f-c \left (\sqrt{e^2-4 d f}+e\right )\right )-b \left (\sqrt{e^2-4 d f}+e\right )}{2 \sqrt{2} \sqrt{a+b x+c x^2} \sqrt{2 a f^2+\sqrt{e^2-4 d f} (c e-b f)-b e f-2 c d f+c e^2}}\right )}{\sqrt{2} f \sqrt{e^2-4 d f}}+\frac{\sqrt{c} \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{f} \]

[Out]

(Sqrt[c]*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/f - (Sqrt[c*(e^
2 - 2*d*f - e*Sqrt[e^2 - 4*d*f]) + f*(2*a*f - b*(e - Sqrt[e^2 - 4*d*f]))]*ArcTan
h[(4*a*f - b*(e - Sqrt[e^2 - 4*d*f]) + 2*(b*f - c*(e - Sqrt[e^2 - 4*d*f]))*x)/(2
*Sqrt[2]*Sqrt[c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*Sqrt[e^2 - 4*d*f]]
*Sqrt[a + b*x + c*x^2])])/(Sqrt[2]*f*Sqrt[e^2 - 4*d*f]) + (Sqrt[c*(e^2 - 2*d*f +
 e*Sqrt[e^2 - 4*d*f]) + f*(2*a*f - b*(e + Sqrt[e^2 - 4*d*f]))]*ArcTanh[(4*a*f -
b*(e + Sqrt[e^2 - 4*d*f]) + 2*(b*f - c*(e + Sqrt[e^2 - 4*d*f]))*x)/(2*Sqrt[2]*Sq
rt[c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*Sqrt[e^2 - 4*d*f]]*Sqrt[a + b
*x + c*x^2])])/(Sqrt[2]*f*Sqrt[e^2 - 4*d*f])

_______________________________________________________________________________________

Rubi [A]  time = 1.63642, antiderivative size = 431, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.185 \[ -\frac{\sqrt{f \left (2 a f-b \left (e-\sqrt{e^2-4 d f}\right )\right )+c \left (-e \sqrt{e^2-4 d f}-2 d f+e^2\right )} \tanh ^{-1}\left (\frac{4 a f+2 x \left (b f-c \left (e-\sqrt{e^2-4 d f}\right )\right )-b \left (e-\sqrt{e^2-4 d f}\right )}{2 \sqrt{2} \sqrt{a+b x+c x^2} \sqrt{2 a f^2-\sqrt{e^2-4 d f} (c e-b f)-b e f-2 c d f+c e^2}}\right )}{\sqrt{2} f \sqrt{e^2-4 d f}}+\frac{\sqrt{f \left (2 a f-b \left (\sqrt{e^2-4 d f}+e\right )\right )+c \left (e \sqrt{e^2-4 d f}-2 d f+e^2\right )} \tanh ^{-1}\left (\frac{4 a f+2 x \left (b f-c \left (\sqrt{e^2-4 d f}+e\right )\right )-b \left (\sqrt{e^2-4 d f}+e\right )}{2 \sqrt{2} \sqrt{a+b x+c x^2} \sqrt{2 a f^2+\sqrt{e^2-4 d f} (c e-b f)-b e f-2 c d f+c e^2}}\right )}{\sqrt{2} f \sqrt{e^2-4 d f}}+\frac{\sqrt{c} \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{f} \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[a + b*x + c*x^2]/(d + e*x + f*x^2),x]

[Out]

(Sqrt[c]*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/f - (Sqrt[c*(e^
2 - 2*d*f - e*Sqrt[e^2 - 4*d*f]) + f*(2*a*f - b*(e - Sqrt[e^2 - 4*d*f]))]*ArcTan
h[(4*a*f - b*(e - Sqrt[e^2 - 4*d*f]) + 2*(b*f - c*(e - Sqrt[e^2 - 4*d*f]))*x)/(2
*Sqrt[2]*Sqrt[c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*Sqrt[e^2 - 4*d*f]]
*Sqrt[a + b*x + c*x^2])])/(Sqrt[2]*f*Sqrt[e^2 - 4*d*f]) + (Sqrt[c*(e^2 - 2*d*f +
 e*Sqrt[e^2 - 4*d*f]) + f*(2*a*f - b*(e + Sqrt[e^2 - 4*d*f]))]*ArcTanh[(4*a*f -
b*(e + Sqrt[e^2 - 4*d*f]) + 2*(b*f - c*(e + Sqrt[e^2 - 4*d*f]))*x)/(2*Sqrt[2]*Sq
rt[c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*Sqrt[e^2 - 4*d*f]]*Sqrt[a + b
*x + c*x^2])])/(Sqrt[2]*f*Sqrt[e^2 - 4*d*f])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 157.719, size = 420, normalized size = 0.97 \[ \frac{\sqrt{c} \operatorname{atanh}{\left (\frac{b + 2 c x}{2 \sqrt{c} \sqrt{a + b x + c x^{2}}} \right )}}{f} + \frac{\sqrt{2} \sqrt{2 a f^{2} - b e f - b f \sqrt{- 4 d f + e^{2}} - 2 c d f + c e^{2} + c e \sqrt{- 4 d f + e^{2}}} \operatorname{atanh}{\left (\frac{\sqrt{2} \left (4 a f - b \left (e + \sqrt{- 4 d f + e^{2}}\right ) + x \left (2 b f - 2 c \left (e + \sqrt{- 4 d f + e^{2}}\right )\right )\right )}{4 \sqrt{a + b x + c x^{2}} \sqrt{2 a f^{2} - b e f - 2 c d f + c e^{2} - \left (b f - c e\right ) \sqrt{- 4 d f + e^{2}}}} \right )}}{2 f \sqrt{- 4 d f + e^{2}}} - \frac{\sqrt{2} \sqrt{2 a f^{2} - b e f + b f \sqrt{- 4 d f + e^{2}} - 2 c d f + c e^{2} - c e \sqrt{- 4 d f + e^{2}}} \operatorname{atanh}{\left (\frac{\sqrt{2} \left (4 a f - b e + b \sqrt{- 4 d f + e^{2}} + x \left (2 b f - 2 c e + 2 c \sqrt{- 4 d f + e^{2}}\right )\right )}{4 \sqrt{a + b x + c x^{2}} \sqrt{2 a f^{2} - b e f - 2 c d f + c e^{2} + \left (b f - c e\right ) \sqrt{- 4 d f + e^{2}}}} \right )}}{2 f \sqrt{- 4 d f + e^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((c*x**2+b*x+a)**(1/2)/(f*x**2+e*x+d),x)

[Out]

sqrt(c)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x**2)))/f + sqrt(2)*sqrt(2
*a*f**2 - b*e*f - b*f*sqrt(-4*d*f + e**2) - 2*c*d*f + c*e**2 + c*e*sqrt(-4*d*f +
 e**2))*atanh(sqrt(2)*(4*a*f - b*(e + sqrt(-4*d*f + e**2)) + x*(2*b*f - 2*c*(e +
 sqrt(-4*d*f + e**2))))/(4*sqrt(a + b*x + c*x**2)*sqrt(2*a*f**2 - b*e*f - 2*c*d*
f + c*e**2 - (b*f - c*e)*sqrt(-4*d*f + e**2))))/(2*f*sqrt(-4*d*f + e**2)) - sqrt
(2)*sqrt(2*a*f**2 - b*e*f + b*f*sqrt(-4*d*f + e**2) - 2*c*d*f + c*e**2 - c*e*sqr
t(-4*d*f + e**2))*atanh(sqrt(2)*(4*a*f - b*e + b*sqrt(-4*d*f + e**2) + x*(2*b*f
- 2*c*e + 2*c*sqrt(-4*d*f + e**2)))/(4*sqrt(a + b*x + c*x**2)*sqrt(2*a*f**2 - b*
e*f - 2*c*d*f + c*e**2 + (b*f - c*e)*sqrt(-4*d*f + e**2))))/(2*f*sqrt(-4*d*f + e
**2))

_______________________________________________________________________________________

Mathematica [A]  time = 4.70277, size = 699, normalized size = 1.62 \[ \frac{\sqrt{2} \log \left (\sqrt{e^2-4 d f}-e-2 f x\right ) \sqrt{f \left (2 a f+b \sqrt{e^2-4 d f}+b (-e)\right )+c \left (-e \sqrt{e^2-4 d f}-2 d f+e^2\right )}-\sqrt{2} \log \left (\sqrt{e^2-4 d f}+e+2 f x\right ) \sqrt{f \left (2 a f-b \left (\sqrt{e^2-4 d f}+e\right )\right )+c \left (e \sqrt{e^2-4 d f}-2 d f+e^2\right )}+2 \sqrt{c} \sqrt{e^2-4 d f} \log \left (2 \sqrt{c} \sqrt{a+x (b+c x)}+b+2 c x\right )-\sqrt{2} \sqrt{f \left (2 a f+b \sqrt{e^2-4 d f}+b (-e)\right )+c \left (-e \sqrt{e^2-4 d f}-2 d f+e^2\right )} \log \left (2 \sqrt{2} \sqrt{e^2-4 d f} \sqrt{a+x (b+c x)} \sqrt{f \left (2 a f+b \sqrt{e^2-4 d f}+b (-e)\right )+c \left (-e \sqrt{e^2-4 d f}-2 d f+e^2\right )}+4 a f \sqrt{e^2-4 d f}+b \left (2 f x \sqrt{e^2-4 d f}-e \sqrt{e^2-4 d f}-4 d f+e^2\right )-2 c e x \sqrt{e^2-4 d f}-8 c d f x+2 c e^2 x\right )+\sqrt{2} \sqrt{f \left (2 a f-b \left (\sqrt{e^2-4 d f}+e\right )\right )+c \left (e \sqrt{e^2-4 d f}-2 d f+e^2\right )} \log \left (2 \sqrt{2} \sqrt{e^2-4 d f} \sqrt{a+x (b+c x)} \sqrt{f \left (2 a f-b \left (\sqrt{e^2-4 d f}+e\right )\right )+c \left (e \sqrt{e^2-4 d f}-2 d f+e^2\right )}+4 a f \sqrt{e^2-4 d f}-b \left (-2 f \left (x \sqrt{e^2-4 d f}+2 d\right )+e \sqrt{e^2-4 d f}+e^2\right )-2 c e x \sqrt{e^2-4 d f}+8 c d f x-2 c e^2 x\right )}{2 f \sqrt{e^2-4 d f}} \]

Antiderivative was successfully verified.

[In]  Integrate[Sqrt[a + b*x + c*x^2]/(d + e*x + f*x^2),x]

[Out]

(Sqrt[2]*Sqrt[f*(-(b*e) + 2*a*f + b*Sqrt[e^2 - 4*d*f]) + c*(e^2 - 2*d*f - e*Sqrt
[e^2 - 4*d*f])]*Log[-e + Sqrt[e^2 - 4*d*f] - 2*f*x] - Sqrt[2]*Sqrt[c*(e^2 - 2*d*
f + e*Sqrt[e^2 - 4*d*f]) + f*(2*a*f - b*(e + Sqrt[e^2 - 4*d*f]))]*Log[e + Sqrt[e
^2 - 4*d*f] + 2*f*x] + 2*Sqrt[c]*Sqrt[e^2 - 4*d*f]*Log[b + 2*c*x + 2*Sqrt[c]*Sqr
t[a + x*(b + c*x)]] - Sqrt[2]*Sqrt[f*(-(b*e) + 2*a*f + b*Sqrt[e^2 - 4*d*f]) + c*
(e^2 - 2*d*f - e*Sqrt[e^2 - 4*d*f])]*Log[4*a*f*Sqrt[e^2 - 4*d*f] + 2*c*e^2*x - 8
*c*d*f*x - 2*c*e*Sqrt[e^2 - 4*d*f]*x + b*(e^2 - 4*d*f - e*Sqrt[e^2 - 4*d*f] + 2*
f*Sqrt[e^2 - 4*d*f]*x) + 2*Sqrt[2]*Sqrt[e^2 - 4*d*f]*Sqrt[f*(-(b*e) + 2*a*f + b*
Sqrt[e^2 - 4*d*f]) + c*(e^2 - 2*d*f - e*Sqrt[e^2 - 4*d*f])]*Sqrt[a + x*(b + c*x)
]] + Sqrt[2]*Sqrt[c*(e^2 - 2*d*f + e*Sqrt[e^2 - 4*d*f]) + f*(2*a*f - b*(e + Sqrt
[e^2 - 4*d*f]))]*Log[4*a*f*Sqrt[e^2 - 4*d*f] - 2*c*e^2*x + 8*c*d*f*x - 2*c*e*Sqr
t[e^2 - 4*d*f]*x + 2*Sqrt[2]*Sqrt[e^2 - 4*d*f]*Sqrt[c*(e^2 - 2*d*f + e*Sqrt[e^2
- 4*d*f]) + f*(2*a*f - b*(e + Sqrt[e^2 - 4*d*f]))]*Sqrt[a + x*(b + c*x)] - b*(e^
2 + e*Sqrt[e^2 - 4*d*f] - 2*f*(2*d + Sqrt[e^2 - 4*d*f]*x))])/(2*f*Sqrt[e^2 - 4*d
*f])

_______________________________________________________________________________________

Maple [B]  time = 0., size = 6019, normalized size = 14. \[ \text{output too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((c*x^2+b*x+a)^(1/2)/(f*x^2+e*x+d),x)

[Out]

result too large to display

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)/(f*x^2 + e*x + d),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)/(f*x^2 + e*x + d),x, algorithm="fricas")

[Out]

Timed out

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\sqrt{a + b x + c x^{2}}}{d + e x + f x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x**2+b*x+a)**(1/2)/(f*x**2+e*x+d),x)

[Out]

Integral(sqrt(a + b*x + c*x**2)/(d + e*x + f*x**2), x)

_______________________________________________________________________________________

GIAC/XCAS [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)/(f*x^2 + e*x + d),x, algorithm="giac")

[Out]

Exception raised: TypeError